<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;

class Notice extends Model
{
    use HasDateTimeFormatter;
    use SoftDeletes;

    protected $table = 'notice';

    // 定义 status 枚举值常量
    const STATUS_SHOW = 1;
    const STATUS_HIDE = 0;

    // 定义 is_top 枚举值常量
    const IS_TOP_YES = 1;
    const IS_TOP_NO = 0;

    // 定义枚举值映射
    const STATUS = [
        self::STATUS_SHOW => '显示',
        self::STATUS_HIDE => '隐藏',
    ];

    const IS_TOP = [
        self::IS_TOP_YES => '是',
        self::IS_TOP_NO => '否',
    ];
}